/* Copyright (c) 2012, Samsung Electronics Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&mdss_mdp {
	dsi_magna_720p_berluti3g: mdss_dsi_magna_octa_720p_video {
		qcom,mdss-dsi-panel-name = "samsung,mdss-amoled-dsi-panel";
		label = "magna amoled 720p video mode dsi D53D6EA8061V panel";
		status = "disable";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
		qcom,enable-gpio = <&msmgpio 16 0>;
		qcom,enable-gpio2 = <&msmgpio 56 0>;
		qcom,rst-gpio = <&msmgpio 25 0>;
		qcom,cont-splash-enabled = <1>;
		qcom,mdss-pan-res = <720 1280>;
		qcom,mdss-pan-size = <60 106>; /* <Width> <Height> real size of panel in mm */
		qcom,mdss-pan-bpp = <24>;
		qcom,mdss-pan-dest = "display_1";
		qcom,mdss-clk-rate=<500000000>;
		qcom,mdss-pan-porch-values = <128 96 128 8 2 14>; /* <HBP> <HPW> <HFP> <VBP> <VPW> <VFP> */
		qcom,mdss-pan-underflow-clr = <0xff>;
		qcom,mdss-pan-bl-ctrl = "bl_ctrl_dcs_cmds";
		qcom,mdss-pan-bl-levels = <1 255>;
		qcom,mdss-pan-dsi-mode = <0>;
		qcom,mdss-pan-dsi-h-pulse-mode = <0>;
		qcom,mdss-pan-dsi-h-power-stop = <0 0 0>;
		qcom,mdss-pan-dsi-bllp-power-stop = <1 1>;
		qcom,mdss-pan-dsi-traffic-mode = <2>;
		qcom,mdss-pan-dsi-dst-format = <3>;
		qcom,mdss-pan-dsi-vc = <0>;
		qcom,mdss-pan-dsi-rgb-swap = <0>;
		qcom,mdss-force-clk-lane-hs = <1>;
		samsung,mdss-early-lcd-on = <1>;
		qcom,mdss-pan-dsi-data-lanes = <1 1 1 1>;
		qcom,mdss-pan-dsi-dlane-swap = <0>;
		qcom,mdss-pan-dsi-t-clk = <0x1b 0x04>;
		qcom,mdss-pan-dsi-stream = <0>;
		qcom,mdss-pan-dsi-mdp-tr = <0x0>;
		qcom,mdss-pan-dsi-dma-tr = <0x04>;
		qcom,mdss-pan-dsi-frame-rate = <60>;
		qcom,panel-phy-regulatorSettings = [07 09 03 00  /* Regualotor settings */
						    20 00 01];
		qcom,panel-phy-timingSettings = [80 27 20 00 3C 3A 21 29 18 03 04 00];

		qcom,panel-phy-strengthCtrl = [ff 06];		/*!!!! */
		qcom,panel-phy-bistCtrl = [00 00 b1 ff           /*!!!! BIST Ctrl settings */
					   00 00];
		qcom,panel-phy-laneConfig = [
		00 00 00 00 00 00 00 01 97 /* lane0 config */
		00 00 00 00 05 00 00 01 97 /* lane1 config */
		00 00 00 00 0a 00 00 01 97 /* lane2 config */
		00 00 00 00 0f 00 00 01 97 /* lane3 config */
		00 c0 00 00 00 00 00 01 bb]; /* Clk ln config */

		qcom,panel-on-cmds = [
					39 01 00 00 00 00 03 F0 5A 5A
					39 01 00 00 00 00 03 F1 5A 5A

					/* 1.common setting */
					39 01 00 00 00 00 03 B8 19 10
					39 01 00 00 00 00 02 BA 57
					39 01 00 00 00 00 03 FC 5A 5A
					39 01 00 00 00 00 02 B0 0B
					39 01 00 00 00 00 03 D2 00 85
					39 01 00 00 00 00 02 B0 05
					39 01 00 00 00 00 02 FE 0C
					39 01 00 00 00 00 02 CB 70
					39 01 00 00 00 00 03 FC A5 A5

					/* 2.brightness control */
					39 01 00 00 00 00 22
						CA 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 05 B2 00 06 00 08
					39 01 00 00 00 00 03 B6 48 8A
					39 01 00 00 00 00 02 F7 01
					39 01 00 00 00 00 02 55 02
					39 01 00 00 00 00 02 F7 01

					05 01 00 00 78 00 02 11 00
					39 01 00 00 00 00 03 F1 A5 A5
					05 01 00 00 00 00 02 29 00];
		qcom,on-cmds-dsi-state = "dsi_lp_mode";
		qcom,panel-off-cmds = [
					05 01 00 00 32 00 02 28 00
					05 01 00 00 78 00 02 10 00];
		qcom,off-cmds-dsi-state = "dsi_hs_mode";

			samsung,panel-nv-mtp-read-cmds = [ 06 01 00 00 00 00 01 c8 21 00];
			samsung,panel-nv-mtp-read-hbm-cmds = [ 06 01 00 00 00 00 01 c8 06 21];	/* read C8 34~39th , 33=0x21*/
			samsung,panel-nv-mtp-read-hbm2-cmds = [ 06 01 00 00 00 00 01 c8 0F 48];	/* read C8 73~87th , 72=0x48*/
			samsung,panel-nv-mdnie-read-cmds = [ 06 01 00 00 00 00 01 A1 04 00];
			samsung,panel-nv-read-cmds = [ 06 01 00 00 00 00 01 c8 21 00];
			samsung,panel-nv-read-enable-cmds = [
								39 01 00 00 00 00 03 f0 5a 5a
								39 01 00 00 00 00 03 fc 5a 5a ];
			samsung,panel-nv-read-disable-cmds = [ 39 01 00 00 00 00 03 f0 a5 a5 ];

			/* the last byte in all read commands will represent READ LENGH */
			samsung,panel-manufacture-id-read-cmds = [
								06 01 00 00 00 00 01 da 01 00
								06 01 00 00 00 00 01 db 01 00
								06 01 00 00 00 00 01 dc 01 00];

			qcom,panel-display-on-cmds = [05 01 00 00 32 00 02 29 00];
			qcom,panel-display-off-cmds = [05 01 00 00 32 00 02 28 00];
							
			qcom,panel-display-unblank-cmds = [39 01 00 00 32 00 02 13 00];			/*Normal mode command*/
			qcom,panel-display-blank-cmds = [39 01 00 00 45 00 02 22 00];		 /* All pixel off - for making display black*/

			samsung,panel-acl-off-cmds = [39 01 00 00 72 00 02 55 00];

			samsung,panel-gamma-cmds-list = [39 01 00 00 00 00 22            /* Brightness Condition Set - Gamma 2.2 Setting*/
						ca 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 02 F7 01 /* Gamma, LTPS(AID) update */
				];

			samsung,panel-gamma-hbm-cmds-list = [39 01 00 00 00 00 22            /* Brightness Condition Set - Gamma 2.2 Setting*/
						ca 01 00 01 00 01 00 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 80
						80 80 80 80 80 80 80 00
						00 00
					39 01 00 00 00 00 02 F7 01 /* Gamma, LTPS(AID) update */
				];
			samsung,panel-etc-hbm-cmds = [
					39 01 00 00 00 00 05 B2 00 06 00 10	/* samsung_brightness_aor_condition */
					39 01 00 00 00 00 03 b6 48 8A 		/* ELVSS  */
					39 01 00 00 00 00 04	B5 01 99 35		/* acl cont */
					39 01 00 00 00 00 05	E3 FF FF FF FF		/* als cont */
					39 01 00 00 00 00 02 55 41	   	/* power saving Set */
					39 01 00 00 00 00 03	BC 20 38		/* psre cont */
				];

			/*
			 * ************************************************************************************************************************
			 * AID command list and mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-aid-cmds-list-350 = [
					39 01 00 00 00 00 05	B2 00 06 04 F7 /*   0 samsung_brightness_aor_98p1 */
					39 01 00 00 00 00 05	B2 00 06 04 EC /*   1 samsung_brightness_aor_97p2 */
					39 01 00 00 00 00 05	B2 00 06 04 E1 /*   2 samsung_brightness_aor_96p4 */
					39 01 00 00 00 00 05	B2 00 06 04 D6 /*   3 samsung_brightness_aor_95p5 */
					39 01 00 00 00 00 05	B2 00 06 04 CB /*   4 samsung_brightness_aor_94p7 */
					39 01 00 00 00 00 05	B2 00 06 04 C0 /*   5 samsung_brightness_aor_93p8 */
					39 01 00 00 00 00 05	B2 00 06 04 B4 /*   6 samsung_brightness_aor_92p9 */
					39 01 00 00 00 00 05	B2 00 06 04 A9 /*   7 samsung_brightness_aor_92p1 */
					39 01 00 00 00 00 05	B2 00 06 04 9E /*   8 samsung_brightness_aor_91p2 */
					39 01 00 00 00 00 05	B2 00 06 04 92 /*   9 samsung_brightness_aor_90p3 */
					39 01 00 00 00 00 05	B2 00 06 04 86 /* 10 samsung_brightness_aor_89p4 */
					39 01 00 00 00 00 05	B2 00 06 04 7B /* 11 samsung_brightness_aor_88p5 */
					39 01 00 00 00 00 05	B2 00 06 04 6F /* 12 samsung_brightness_aor_87p6 */
					39 01 00 00 00 00 05	B2 00 06 04 64 /* 13 samsung_brightness_aor_86p7 */
					39 01 00 00 00 00 05	B2 00 06 04 58 /* 14 samsung_brightness_aor_85p8 */
					39 01 00 00 00 00 05	B2 00 06 04 4D /* 15 samsung_brightness_aor_85p0 */
					39 01 00 00 00 00 05	B2 00 06 04 36 /* 16 samsung_brightness_aor_83p2 */
					39 01 00 00 00 00 05	B2 00 06 04 2A /* 17 samsung_brightness_aor_82p3 */
					39 01 00 00 00 00 05	B2 00 06 04 1F /* 18 samsung_brightness_aor_81p4 */
					39 01 00 00 00 00 05	B2 00 06 04 14 /* 19 samsung_brightness_aor_80p6 */
					39 01 00 00 00 00 05	B2 00 06 03 FD /* 20 samsung_brightness_aor_78p8 */
					39 01 00 00 00 00 05	B2 00 06 03 F1 /* 21 samsung_brightness_aor_77p9 */
					39 01 00 00 00 00 05	B2 00 06 03 DB /* 22 samsung_brightness_aor_76p2 */
					39 01 00 00 00 00 05	B2 00 06 03 C0 /* 23 samsung_brightness_aor_74p1 */
					39 01 00 00 00 00 05	B2 00 06 03 B5 /* 24 samsung_brightness_aor_73p2 */
					39 01 00 00 00 00 05	B2 00 06 03 85 /* 25 samsung_brightness_aor_69p5 */
					39 01 00 00 00 00 05	B2 00 06 03 61 /* 26 samsung_brightness_aor_66p7 */
					39 01 00 00 00 00 05	B2 00 06 03 4A /* 27 samsung_brightness_aor_65p0 */
					39 01 00 00 00 00 05	B2 00 06 03 32 /* 28 samsung_brightness_aor_63p1 */
					39 01 00 00 00 00 05	B2 00 06 03 0D /* 29 samsung_brightness_aor_60p3 */
					39 01 00 00 00 00 05	B2 00 06 02 E8 /* 30 samsung_brightness_aor_57p4 */
					39 01 00 00 00 00 05	B2 00 06 02 C3 /* 31 samsung_brightness_aor_54p6 */
					39 01 00 00 00 00 05	B2 00 06 02 9E /* 32 samsung_brightness_aor_51p7 */
					39 01 00 00 00 00 05	B2 00 06 02 78 /* 33 samsung_brightness_aor_48p8 */
					39 01 00 00 00 00 05	B2 00 06 02 4D /* 34 samsung_brightness_aor_45p5 */
					39 01 00 00 00 00 05	B2 00 06 02 18 /* 35 samsung_brightness_aor_41p4 */
					39 01 00 00 00 00 05	B2 00 06 02 06 /* 36 samsung_brightness_aor_40p0 */
					39 01 00 00 00 00 05	B2 00 06 01 E4 /* 37 samsung_brightness_aor_37p4 */
					39 01 00 00 00 00 05	B2 00 06 01 AD /* 38 samsung_brightness_aor_33p1 */
					39 01 00 00 00 00 05	B2 00 06 01 7A /* 39 samsung_brightness_aor_29p2 */
					39 01 00 00 00 00 05	B2 00 06 01 2E /* 40 samsung_brightness_aor_23p3 */
					39 01 00 00 00 00 05	B2 00 06 00 ED /* 41 samsung_brightness_aor_18p3 */
					39 01 00 00 00 00 05	B2 00 06 00 A7 /* 42 samsung_brightness_aor_12p9 */
					39 01 00 00 00 00 05	B2 00 06 00 54 /* 43 samsung_brightness_aor_06p5 */
					39 01 00 00 00 00 05	B2 00 06 00 10 /* 44 samsung_brightness_aor_01p2 */
				];

			/* bl_level, Index in acl command list */
			samsung,panel-aid-map-table = <
					2    0         3    1        4    2
					5    3         6    4        7    5        8    6      9    7
					10   8         11   9        12   10       13   11     14   12
					15   13        16   14       17   15       19   16     20   17
					21   18        22   19       24   20       25   21     27   22
					29   23        30   24       32   25       34   26     37   26
					39   27        41   28       44   29       47   30     50   31
					53   32        56   33       60   34       64   35     68   36
					72   36        77   36       82   36       87   36     93   36
					98   36        105  36       111  36       119  36     126  36
					134  36        143  36       152  36       162  37     172  38
					183  39        195  40       207  41       220  42     234  43
					249  44        265  44       282  44       300  44     316  44
					333  44        350  44
				>;

			/* 
			 * ************************************************************************************************************************
			 * ACL command list and mappings
			 * ************************************************************************************************************************
			 */
			 /* B5h
 			   * 1st - 0x01 : PSRE , 0x03 : no PSRE
			   * 2nd(OPR) - 0x99 : 60%
 			   * 3rd(ACL) - 0x23 : 27.6% , 0x27 : 30%, 0x35 : 40%
 			   */
			samsung,panel-aclcont-cmds-list = [
					39 01 00 00 00 00 04	B5 03 99 35	 /* 0x27 : 30% */
			 ];
			samsung,panel-acl-cmds-list = [
					39 01 00 00 00 00 02 55 00 /* 0 */
					39 01 00 00 00 00 02 55 01 /* 1 */
					39 01 00 00 00 00 02 55 02 /* 2 */
					39 01 00 00 00 00 02 55 03]; /* 3 */
			/* bl_level , Index in acl command list */
			samsung,panel-acl-map-table =  <
					2    2         3    2        4    2
					5    2         6    2        7    2         8    2      9    2
					10   2         11   2        12   2         13   2      14   2
					15   2         16   2        17   2         19   2      20   2
					21   2         22   2        24   2         25   2      27   2
					29   2         30   2        32   2         34   2      37   2
					39   2         41   2        44   2         47   2      50   2
					53   2         56   2        60   2         64   2      68   2
					72   2         77   2        82   2         87   2      93   2
					98   2         105  2        111  2         119  2      126  2
					134  2         143  2        152  2         162  2      172  2
					183  2         195  2        207  2         220  2      234  2
					249  2         265  2        282  2         300  2      316  2
					333  2         350  2
				>;

			/*
			 * ************************************************************************************************************************
			 * ELVSS command list and mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-elvss-cmds-list = [
					39 01 00 00 00 00 03 b6 48 98 /* 0    77   ~ 2     nit : 0x98 */
					39 01 00 00 00 00 03 b6 48 97 /* 1    82   ~ 87   nit : 0x97 */
					39 01 00 00 00 00 03 b6 48 96 /* 2    93   ~ 98   nit : 0x96 */
					39 01 00 00 00 00 03 b6 48 95 /* 3    105 ~ 111 nit : 0x95 */
					39 01 00 00 00 00 03 b6 48 94 /* 4    119           nit : 0x94 */
					39 01 00 00 00 00 03 b6 48 93 /* 5    126           nit : 0x93 */
					39 01 00 00 00 00 03 b6 48 92 /* 6    134 ~ 143 nit : 0x92 */
					39 01 00 00 00 00 03 b6 48 91 /* 7    152           nit : 0x91 */
					39 01 00 00 00 00 03 b6 48 90 /* 8    162           nit : 0x90 */
					39 01 00 00 00 00 03 b6 48 8F /* 9    172           nit : 0x8F */
					39 01 00 00 00 00 03 b6 48 8E /* 10  183           nit : 0x8E */
					39 01 00 00 00 00 03 b6 48 8D /* 11  195 ~ 282 nit : 0x8D */
					39 01 00 00 00 00 03 b6 48 8C /* 12  300           nit : 0x8C */
					39 01 00 00 00 00 03 b6 48 8B /* 13  316 ~ 333 nit : 0x8B */
					39 01 00 00 00 00 03 b6 48 8A /* 14  350           nit : 0x8A */
				];
			samsung,panel-elvss-lowtemp-cmds-list = [
					39 01 00 00 00 00 03 b6 48 98 /* 0    77   ~ 2     nit : 0x98 */
					39 01 00 00 00 00 03 b6 48 97 /* 1    82   ~ 87   nit : 0x97 */
					39 01 00 00 00 00 03 b6 48 96 /* 2    93   ~ 98   nit : 0x96 */
					39 01 00 00 00 00 03 b6 48 95 /* 3    105 ~ 111 nit : 0x95 */
					39 01 00 00 00 00 03 b6 48 94 /* 4    119           nit : 0x94 */
					39 01 00 00 00 00 03 b6 48 93 /* 5    126           nit : 0x93 */
					39 01 00 00 00 00 03 b6 48 92 /* 6    134 ~ 143 nit : 0x92 */
					39 01 00 00 00 00 03 b6 48 91 /* 7    152           nit : 0x91 */
					39 01 00 00 00 00 03 b6 48 90 /* 8    162           nit : 0x90 */
					39 01 00 00 00 00 03 b6 48 8F /* 9    172           nit : 0x8F */
					39 01 00 00 00 00 03 b6 48 8E /* 10  183           nit : 0x8E */
					39 01 00 00 00 00 03 b6 48 8D /* 11  195 ~ 282 nit : 0x8D */
					39 01 00 00 00 00 03 b6 48 8C /* 12  300           nit : 0x8C */
					39 01 00 00 00 00 03 b6 48 8B /* 13  316 ~ 333 nit : 0x8B */
					39 01 00 00 00 00 03 b6 48 8A /* 14  350           nit : 0x8A */
				];
			samsung,panel-elvss-cmds-tempcompen-list = [39 01 00 00 00 00 08 B8 38 07 30 00 28 19 02];

			/* bl_level, Index in elvss command list */
			samsung,panel-elvss-map-table = <
					2    0         3    0        4    0
					5    0         6    0        7    0         8    0      9    0
					10   0         11   0        12   0         13   0      14   0
					15   0         16   0        17   0         19   0      20   0
					21   0         22   0        24   0         25   0      27   0
					29   0         30   0        32   0         34   0      37   0
					39   0         41   0        44   0         47   0      50   0
					53   0         56   0        60   0         64   0      68   0
					72   0         77   0        82   1         87   1      93   2
					98   2         105  3        111  3         119  4      126  5
					134  6         143  6        152  7         162  8      172  9
					183  10        195  11       207  11        220  11     234  11
					249  11        265  11       282  11        300  12     316  13
					333  13        350  14
					>;
			/*
			 * ************************************************************************************************************************
			 * candela to index mappings
			 * ************************************************************************************************************************
			 */
			samsung,panel-candella-mapping-table = <
				/*<idx>		<from>		<till>		<candella> */
				0		0		10		10
				1		11		11		11
				2		12		12		12
				3		13		13		13
				4		14		14		14
				5		15		15		15
				6		16		16		16
				7		17		18		17
				8		19		19		19
				9		20		20		20
				10		21		21		21
				11		22		23		22
				12		24		24		24
				13		25		26		25
				14		27		28		27
				15		29		29		29
				16		30		31		30
				17		32		32		32
				18		33		36		34
				19		37		38		37
				20		39		40		39
				21		41		43		41
				22		44		46		44
				23		47		49		47
				24		50		52		50
				25		53		55		53
				26		56		59		56
				27		60		63		60
				28		64		67		64
				29		68		71		68
				30		72		76		72
				31		77		81		77
				32		82		86		82
				33		87		92		87
				34		93		97		93
				35		98		104		98
				36		105		110		105
				37		111		118		111
				38		119		125		119
				39		126		133		126
				40		134		142		134
				41		143		149		143
				42		150		161		152
				43		162		171		162
				44		172		182		172
				45		183		194		183
				46		195		206		195
				47		207		219		207
				48		220		232		220
				49		233		248		234
				50		249		249		249
				51		250		251		265
				52		252		253		282
				53		254		255		300
				>;
			samsung,panel-candella-mapping-table-350 = <
				/*<idx>		<from>		<till>		<candella> */
				0		0		2		2				
				1		3		3		3
				2		4		4		4
				3		5		5		5
				4		6		6		6
				5		7		7		7
				6		8		8		8
				7		9		9		9
				8		10		10		10
				9		11		11		11
				10		12		12		12
				11		13		13		13
				12		14		14		14
				13		15		15		15
				14		16		16		16
				15		17		18		17
				16		19		19		19
				17		20		20		20
				18		21		21		21
				19		22		23		22
				20		24		24		24
				21		25		26		25
				22		27		28		27
				23		29		29		29
				24		30		31		30
				25		32		32		32
				26		33		36		34
				27		37		38		37
				28		39		40		39
				29		41		43		41
				30		44		46		44
				31		47		49		47
				32		50		52		50
				33		53		55		53
				34		56		59		56
				35		60		63		60
				36		64		67		64
				37		68		71		68
				38		72		76		72
				39		77		81		77
				40		82		86		82
				41		87		92		87
				42		93		97		93
				43		98		104 	98
				44		105 	110 	105
				45		111 	118 	111
				46		119 	125 	119
				47		126 	133 	126
				48		134 	142 	134
				49		143 	149 	143
				50		150 	161 	152
				51		162 	171 	162
				52		172 	181 	172
				53		182 	193 	183
				54		194 	205 	195
				55		206 	218 	207
				56		219 	229 	220
				57		230 	237 	234
				58		238 	241 	249
				59		242 	244 	265
				60		245 	247 	282
				61		248 	249 	300
				62		250 	251 	316
				63		252 	253 	333
				64		254 	255 	350
				>;
	};
};
